<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<html xmlns:th="http://www.thymeleaf.org"></html>
<head>
    <meta charset="UTF-8">
    <script src="/webjars/jquery/3.1.1/jquery.min.js"></script>
    <script src="/webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet"
          href="/webjars/bootstrap/3.3.7/css/bootstrap.min.css"/>
    <title>修改图书信息</title>
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    datatoggle="collapse"
                    data-target="#bs-example-navbar-collapse-1"
                    ariaexpanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/book/bookList">图书管理系统</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">图书信息<span class="sr-only">
    (current)</span></a></li>
                <li><a href="#">新书推荐</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       role="button" aria-haspopup="true" aria-expanded="false">
                        更多操作 <span
                            class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">One more separated link</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="搜素更多
图书...">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Training.L</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       role="button" aria-haspopup="true" aria-expanded="false">
                        用户管理 <span
                            class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">修改密码</a></li>
                        <li><a href="#">添加地址</a></li>
                        <li><a href="#">订单记录</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">退出登录</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>
<!-- 布局 3：7 -->
<div class="container-fluid">
    <div class="row">
        <div class="col-md-3">
            <div class="list-group">
                <a href="#" class="list-group-item active">
                    首页
                </a>
                <a href="/book/bookList" class="list-group-item">图书列表</a>
                <a href="/publisher/publisherList" class="list-group-item">出版社
                    列表</a>
                <a href="/book/AuthorList" class="list-group-item">作者信息列表</a>
                <a href="#" class="list-group-item">关于我们</a>
            </div>
        </div>
        <div class="col-md-9">
            <h1 class="text-center text-muted">更新图书信息</h1>
            <hr>
            <form th:action="@{/book/update}" method="post" class="form
horizontal" role="form">
                <div class="form-group">
                    <label for="ID" class="col-sm-2 control-label">图书编号:
                    </label>
                    <div class="col-sm-10">
                        <input type="text" name="id" id="ID" class="form
control"
                               th:value="${book.id}" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">书籍名称:
                    </label>
                    <div class="col-sm-10">
                        <input type="text" name="title" id="title" class="form
control"
                               th:value="${book.title}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="price" class="col-sm-2 control-label">书籍价格:
                    </label>
                    <div class="col-sm-10">
                        <input type="text" name="price" id="price" class="form
control"
                               th:value="${book.price}">
                    </div>
                </div>
                <div class="form-group">
                    <label for="date" class="col-sm-2 control-label">出版日期:
                    </label>
                    <div class="col-sm-10">
                        <input type="date" name="publishDate" id="date"
                               class="form-control"
                               th:value="${#dates.format(book.publishDate,'yyyy
MM-dd')}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">图书出版社:</label>
                    <div class="col-sm-10">
                        <select name="publisherId" class="form-control">
                            <option th:each="p:${publishers}"
                                    th:text="${p.publisherName}" th:value="${p.id}"></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="author" class="col-sm-2 control-label">作者:
                    </label>
                    <div class="col-sm-10">
                        <input type="text" name="authorInfo" id="author"
                               class="form-control"
                               th:value="${book.authorInfo}">
                    </div>

                </div>
                <hr>
                <input type="submit" value="提交修改" class="btn btn-primary btn
block">
            </form>
        </div>
    </div>
</div>
</body>
</html>